package com.example.weisdk.utils;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

public class SignUtils {
    /**
     * 生成签名
     */

    public static String genSign(String body,String secretKey){
        Digester md5 = new Digester(DigestAlgorithm.SHA256);
        //构建签名内容，将哈希映射转为字符串并拼接密钥
        String content=body +"."+ secretKey;
        return md5.digestHex(content);
    }
}
